function CellMapHist(values, nbin, xLim, xLabel, saveLocation)
% 2006 ML

c = figure;
set(c, 'PaperPosition', [0 0 8 8], 'PaperSize', [8 8], 'Position', [300 300 400 400]);
if nbin == 0
    h = hist(values);
    hist(values);
else
    h = hist(values, nbin);
    hist(values, nbin);
end
% axis([0 max(values)*1.05 0 (max(h)*1.1)]);
axis square
if xLim(2) < max(values)
    xLim(2) = max(values);
end    
set(gca, ...
    'Position', [0.1 0.09 0.9 0.85], ...
    'FontSize', 15, ...
    'XLim', xLim, ...
    'XTick', [ min(xLim) : ( max(xLim) - min(xLim ) ) / 5 : max(xLim) ]);
xlabel(xLabel);
% text(max(values) / 2, -max(h) / 11.5, xLabel, 'FontSize', 20);

if saveLocation ~= 0
    saveas(c, [saveLocation '.jpg'], 'jpg');
    % print('-dpdf', [saveLocation '.pdf']);
end
